import axios from "axios"

const http = axios.create({
  // baseURL: "/api",
  timeout: 5000,
})

http.interceptors.request.use(
  (config) => {
    console.log(config)
    return config
  },
  (error) => {
    return Promise.reject(error)
  }
)

http.interceptors.response.use(
  (response) => {
    return response.data
  },
  (error) => {
    console.log(error)
  }
)
export { http }
